{include file="public/header" /}
<style>
    .layui-form-item{
        margin-bottom: 5px
    }
    .layui-form-label{
        width: 172px;
    }
    .layui-input-block{
        margin-left: 180px
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>充值</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">地区：</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input" value="{$user.user_area_str}" disabled>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md12" style="width: 100%">
                            <label class="layui-form-label">用户信息：</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$user.user_real_name}---{$user.user_phone}" disabled>
                            </div>

                            <label class="layui-form-label" style="width: 7%">上级：</label>
                            <div class="layui-input-inline" style="width: 120px">
                                <input type="text" class="layui-input" value="{$user.superior}" disabled>
                            </div>

                            <label class="layui-form-label" style="width: 12%">现可用积分：</label>
                            <div class="layui-input-inline" style="width: 120px;">
                                <input type="text" class="layui-input" value="{$user.user_bo_balance}" disabled>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label" style="text-align:left"><h2>首期款</h2></label>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">充值金额：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="first_balance" value="0" class="layui-input" title="0"/>
                                <input type="radio" name="first_balance" value="19800" class="layui-input" title="19800"/>
                                <input type="radio" name="first_balance" value="39800" class="layui-input" title="39800"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">入系统选项：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="inSystem" value="1" class="layui-input" title="实际打款入系统"/>
                                <input type="radio" name="inSystem" value="2" class="layui-input" title="添加身份入系统"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">渠道：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="qd" value="1" class="layui-input" title="线上"/>
                                <input type="radio" name="qd" value="2" class="layui-input" title="线下"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">直开协助：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="zk" value="1" class="layui-input" title="有协助"/>
                                <input type="radio" name="zk" value="2" class="layui-input" title="无协助"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">团队长协助：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="tz" value="1" class="layui-input" title="有协助"/>
                                <input type="radio" name="tz" value="2" class="layui-input" title="无协助"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">帮助开发人员：</label>
                            <div class="layui-input-block" style="width: 40%">
                                <select name="xie_user_id" xm-select="select1" xm-select-radio="" xm-select-search="" xm-select-search-type="dl">
                                    {foreach name="xieUser" item="v"}
                                    <option value="{$v.user_id}">{$v.user_real_name}---{$v.user_phone}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label" style="text-align:left"><h2>补货款</h2></label>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md12">
                            <label class="layui-form-label">金额：</label>
                            <div class="layui-input-inline" style="width: 220px">
                                <input type="text" name="huo_balance" placeholder="金额，单位：元" class="layui-input" oninput="value=value.replace(/[^\-?\d.]/g,'')" value="">
                            </div>

                            <label class="layui-form-label" style="width: 10%;">备注：</label>
                            <div class="layui-input-inline" style="width: 250px">
                                <input type="text" name="integral_remark_huo" placeholder="备注" class="layui-input">
                            </div>
                        </div>

<!--                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">-->
<!--                            <label class="layui-form-label">是否分佣：</label>-->
<!--                            <div class="layui-input-block">-->
<!--                                <input type="radio" name="is_fy" value="1" class="layui-input" title="是" checked/>-->
<!--                                <input type="radio" name="is_fy" value="2" class="layui-input" title="否"/>-->
<!--                            </div>-->
<!--                        </div>-->






                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label" style="text-align:left"><h2>秒杀款</h2></label>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md12">
                            <label class="layui-form-label">金额：</label>
                            <div class="layui-input-inline" style="width: 220px">
                                <input type="text" name="ms_balance" placeholder="金额，单位：元" class="layui-input" oninput="value=value.replace(/[^\-?\d.]/g,'')" value="">
                            </div>

                            <label class="layui-form-label" style="width: 10%;">备注：</label>
                            <div class="layui-input-inline" style="width: 250px">
                                <input type="text" name="ms_remark" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label" style="text-align:left"><h2>特惠商品款</h2></label>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md12">
                            <label class="layui-form-label">金额：</label>
                            <div class="layui-input-inline" style="width: 220px">
                                <input type="text" name="th_balance" placeholder="金额，单位：元" class="layui-input" oninput="value=value.replace(/[^\-?\d.]/g,'')" value="">
                            </div>

                            <label class="layui-form-label" style="width: 10%;">备注：</label>
                            <div class="layui-input-inline" style="width: 250px">
                                <input type="text" name="th_remark" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label" style="text-align:left"><h2>其它款项</h2></label>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md12">
                            <label class="layui-form-label">金额：</label>
                            <div class="layui-input-inline" style="width: 220px">
                                <input type="text" name="other_balance" placeholder="金额，单位：元" class="layui-input" oninput="value=value.replace(/[^\-?\d.]/g,'')" value="">
                            </div>

                            <label class="layui-form-label" style="width: 10%;">备注：</label>
                            <div class="layui-input-inline" style="width: 250px">
                                <input type="text" name="other_remark" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <input type="hidden" value="{$user_id}" name="user_id">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">保存
                                </button>
                                <!--<button class="layui-btn layui-btn-primary" onclick="history.go(-1)">关闭</button>-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script>
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('userRecharge')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1500,shade:0.1},function(index){
                            wk.layer_close();
                        })
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>

</body>
</html>
